package com.prs.crm.dao.oa.impl;

import java.util.List;

import org.hibernate.Criteria;
import org.hibernate.criterion.Restrictions;

import com.prs.crm.dao.impl.BaseDaoImpl;
import com.prs.crm.dao.oa.CommentChildDao;
import com.prs.crm.domain.oa.Comment;
import com.prs.crm.domain.oa.CommentChild;

public class CommentChildDaoImpl extends BaseDaoImpl<CommentChild> implements CommentChildDao{

	@Override
	public List<CommentChild> getChildByComment(Comment comment) {
		Criteria criteria = this.getSession().createCriteria(CommentChild.class);
		criteria.add(Restrictions.eq("comment", comment));
		return criteria.list();
	}

}
